import 'package:flutter/material.dart';
import 'package:overlay_support/overlay_support.dart';

import '../component/toast/toast_widget.dart';

class ToastUtils {
  ToastUtils._();

  static void show(String msg) {
    showOverlay(
      (context, t) {
        return Opacity(opacity: t, child: ToastWidget(content: msg));
      },
      curve: Curves.ease,
      key: const ValueKey('overlay_toast'),
      duration: Toast.LENGTH_SHORT,
      // context: context,
    );
  }
}
